import React, {useRef, useEffect} from 'react'

export function usePropsRef<T>(props: T) {
  const ref = useRef(props)
  useEffect(() => {
    ref.current = props
  })
  return ref
}
